
<template>
  <div>
      <div>
      <h4>json 数据测试</h4>
        <p>{{JSON.stringify(json)}}</p>
      </div>

      <div>
      <h4>数组数据测试</h4>
        <p>{{JSON.stringify(arr)}}</p>
      </div>

      <div>
      <h4>传递给组件的json对象</h4>
        <p>{{JSON.stringify(barData)}}</p>
      </div>
      <my-chart-bar :value="barData" :run="run"></my-chart-bar>
  </div>
</template>

<script>
import { MyChartBar } from '_c/charts'
export default {
  components: {
    MyChartBar
  },
  data () {
    return {
      mol: false,
      shows: false,
      cardShow: false,
      modal_loading: false,
      serverResult: '',
      json: {
        abc: 123
      },
      arr: [],
      barData: {
        legend: [ '接件量', '办结量' ],
        xAxis: [],
        xAxisMap: {},
        seriesData: [
          { name: '接件量', data: [ 1, 2, 3, 4, 5, 6, 7 ], type: 'bar' },
          { name: '办结量', data: [ 2, 3, 4, 5, 6, 7, 8 ], type: 'bar' }
        ]
      },
      run: 1
    }
  },
  methods: {},
  mounted () {
    let that = this
    let i = 0
    setInterval(function () {
      i++
      // that.json = { lh: i }
      that.json.lk = i
      that.arr.push({ lt: i })
      that.barData.xAxis.push(i)
      that.run = i.toString()
    }, 2000)
  }
}
</script>

<style>

</style>
